using System;

namespace Ayatta.Contract.Domain
{
    /// <summary>
    /// 商品属性(针对分类子叶节点)可以有子级,如果有子级就是要严格的一个父级只有一个子级
    /// </summary>
    [Serializable]
    public class ProductAttributeName : Versionable<long>
    {
        /// <summary>
        /// 编码(两位一级)
        /// </summary>
        public string AttributeNameCode { get; set; }

        /// <summary>
        /// 父级属性名编码
        /// </summary>
        public string ParentAttributeNameCode { get; set; }

        /// <summary>
        /// 父级属性名对应的属性值编码
        /// </summary>
        public string ParentAttributeValueCode { get; set; }

        /// <summary>
        /// 属性名
        /// </summary>
        public string AttributeName { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string AttributeNameDescription { get; set; }

        /// <summary>
        /// 级
        /// </summary>
        public int AttributeNameLevel { get; set; }

        /// <summary>
        /// 属性类型(0为普通属性,1为关键属性,2为销售属性)
        /// </summary>
        public ProductAttributeType AttributeType { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public ProductAttributeControlType AttributeControlType { get; set; }

        /// <summary>
        /// 是否为必选项
        /// </summary>
        public bool IsMust { get; set; }

        /// <summary>
        /// 是否可设置图片(针对销售属性 比如 颜色)
        /// </summary>
        public bool SetPictureEnabled { get; set; }

        /// <summary>
        /// 商品分类编码(子叶节点如果为00则是公共属性名)
        /// </summary>
        public string ProductCategoryCode { get; set; }

        /// <summary>
        /// 是否有子级属性
        /// </summary>
        public bool HasChild { get; set; }

        /// <summary>
        /// 子级属性编码
        /// </summary>
        public string ChildAttributeNameCode { get; set; }

        /// <summary>
        /// 是否为公共属性
        /// </summary>
        public bool Shared { get; set; }

        /// <summary>
        /// 排除在外的
        /// </summary>
        public string Excluded { get; set; }

        /// <summary>
        /// 排列顺序
        /// </summary>
        public int DisplayOrder { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public bool Status { get; set; }

    }
}